home *** CD-ROM | disk | FTP | other *** search
- /* asin.c, FUNCTION FROM PAGE 197 OF TURBOC BIBLE */
- #include <stdio.h>
- #include <stdlib.h> /* errno is defined here */
- #include <math.h>
- #define R_TO_D 57.29578 /* radians to degrees */
- main()
- {
- double value, result;
- for(value = -1.0; value <= 1.0; value += 0.2)
- {
- result = asin(value) * R_TO_D;
- if(errno != EDOM)
- {
- printf("arc sine (%f) = %f deg.\n",value, result);
- }
- }
- }